//#include <tchar.h>
#include <math.h>
#include <stdio.h>
//#include <conio.h>
#include <iostream>
using namespace std;

//int _tmain(int argc, _TCHAR* argv[])
int main()
{
	double a=0.0;
	cin>>a;
	
	double z1 = 2.0 * pow(sin((3.0 * (3.1415926535897932385)) - (2.0 * a)) * cos((5.0 * (3.1415926535897932385)) + (2.0 * a)), 2.0);
	double z2 = 1.0 / 4.0 - 1.0 / 4.0 * sin(5.0 / 2.0 * (3.14159263538) - 8 * a);
	int q = (int)z1;
	
	while (1)
	{;}
	
	printf("%.5f\n",z1);
	printf("%.5f",z2);
	return 0;
}